package com.project.model;

import java.util.List;

import com.project.dto.JoinFriendDto;
import com.project.dto.JoinTtalkDto;
import com.project.dto.TFriendDto;
import com.project.dto.TPeopleDto;
import com.project.dto.TPicDto;
import com.project.dto.TWallDto;
import com.project.dto.TtalkDto;

public class TPeopleUserService implements ITPeopleUser {
	private static TPeopleUserService tPeopleUserService;
	private ITPeopleUser manager;
	private TPeopleUserService(){
		manager = new TPeopleUserManager();
	}
	
	public static TPeopleUserService getInstance(){
		if(tPeopleUserService==null){
			tPeopleUserService = new TPeopleUserService();
		}
		return tPeopleUserService;
	}

	@Override
	public int addTpeopleUser(TPeopleDto tDto) {
		return manager.addTpeopleUser(tDto);
	}

	@Override
	public int updateTpeopleUser(TPeopleDto tDto) {
		return manager.updateTpeopleUser(tDto);
	}

	@Override
	public TPeopleDto login(TPeopleDto tDto) {
		return manager.login(tDto);
	}

	@Override
	public List<TPeopleDto> connTPeopleUser(String conn) {
		return manager.connTPeopleUser(conn);
	}

	@Override
	public int updateUserState(String email) {
		return manager.updateUserState(email);
	}

	@Override
	public int updateTpeople(TPeopleDto tDto) {
		
		return manager.updateTpeople(tDto);
	}

	@Override
	public int writeTwall(TWallDto tDto) {
		
		return manager.writeTwall(tDto);
	}

	@Override
	public List<TWallDto> getTWallList(String board) {
	
		return manager.getTWallList(board);
	}



	@Override
	public int replyinsert(TWallDto tDto) {
		
		return manager.replyinsert(tDto);
	}

	@Override
	public int replyupdate(TWallDto tDto) {
		return manager.replyupdate(tDto);
	}

	@Override
	public TPeopleDto selectuser(String email) {
		
		return manager.selectuser(email);
	}
	@Override
	public List<TPeopleDto> findTpeopleUser(String name) {
		return manager.findTpeopleUser(name);
	}
	
	@Override
	public int regiTFriendDto(TFriendDto tDto) {
		
		return manager.regiTFriendDto(tDto);
	}
	
	@Override
	public int updateTFriendDto(TFriendDto tDto) {
		
		return manager.updateTFriendDto(tDto);
	}
	
	@Override
	public List<JoinFriendDto> getTMateListDto(String email) {
	
		return manager.getTMateListDto(email);
	}

	@Override
	public TPeopleDto friendDto(String email) {
		
		return manager.friendDto(email);
	}

	@Override
	public int del(int wcode) {
		
		return manager.del(wcode);
	}

	@Override
	public List<TFriendDto> friendList(String email) {
		
		return manager.friendList(email);
	}

	@Override
	public int addFile(TPeopleDto tDto) {
		return manager.addFile(tDto);
	}

	

	@Override
	public int addTpic(TPicDto tDto) {
		return manager.addTpic(tDto);
	}

	@Override
	public List<TPicDto> allTpic(String pboard,int page) {
		return manager.allTpic(pboard,page);
	}


	@Override
	public TPicDto getTpic(int pcode) {
		return manager.getTpic(pcode);
	}

	@Override
	public int tpicreply(TPicDto tDto) {
		// TODO Auto-generated method stub
		return manager.tpicreply(tDto);
	}

	@Override
	public List<TPicDto> allreply(int pcode) {
		// TODO Auto-generated method stub
		return manager.allreply(pcode);
	}

	@Override
	public int delpic(int pcode) {
		// TODO Auto-generated method stub
		return manager.delpic(pcode);
	}

	@Override
	public int logoutUserState(String email) {
		
		return manager.logoutUserState(email);
	}		
	@Override
	public List<JoinFriendDto> getTtalkFriendList(JoinFriendDto fdto){
		return manager.getTtalkFriendList(fdto);
	}
	
	@Override
	public int writeTtalkDto(TtalkDto tDto) {
		return manager.writeTtalkDto(tDto);
	}
	
	@Override
	public int writeJoinTtalkDto(JoinTtalkDto tDto) {
		return manager.writeJoinTtalkDto(tDto);
	}
	
	public List<JoinTtalkDto> getTtalkContList(String email){
		return manager.getTtalkContList(email);
	}
	
	public List<JoinTtalkDto> getTtalkSendList(String email){
		return manager.getTtalkSendList(email);
	}
	@Override
	public List<JoinFriendDto> getConnFriendList(JoinFriendDto cdto){
		return manager.getConnFriendList(cdto);
	}
	@Override
	public int receiveDelTtalk(TtalkDto tDto) {
		
		return manager.receiveDelTtalk(tDto);
	}
	
	@Override
	public int sendDelTtalk(TtalkDto tDto){
		
		return manager.sendDelTtalk(tDto);
	}
public int getCount(String email) {
		
		return manager.getCount(email);
	}

	@Override
	public List<TWallDto> getTWallList1(String board, int page) {
		return manager.getTWallList1(board,page);
	}

	@Override
	public int getTpicCount(String email) {
		
		return manager.getTpicCount(email);
	}

	@Override
	public List<TPeopleDto> flist(String email) {
		
		return manager.flist(email);
	}
	
	public List<TWallDto> allTNews(String email) {
		
		return manager.allTNews(email);
	}		
	
	
	
	
}
